package com.xy.entity.express.express100;


import com.thoughtworks.xstream.XStream;
import lombok.Data;


//快递100 回调请求 （返回运单的物流信息）
@Data
public class NoticeRequest {

    private static XStream xstream;
    private String status = "";
    private String billstatus = "";
    private String message = "";
    private ExpressResult lastResult = new ExpressResult();



    private static XStream getXStream() {
        if (xstream == null) {
            xstream = new XStream();
            xstream.autodetectAnnotations(true);
            xstream.alias("pushRequest", NoticeRequest.class);
            xstream.alias("item", OneResultItem.class);
        }
        return xstream;
    }

    public String toXml() {
        return "<?xml version='1.0' encoding='UTF-8'?>\r\n" + getXStream().toXML(this);
    }

    public static NoticeRequest fromXml(String sXml) {
        return (NoticeRequest) getXStream().fromXML(sXml);
    }


}
